import requests
url = 'http://httpbin.org/post'
# UA伪装
headers= {
    "User-Agent":'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'
}
params= {
    'name':'zhangsan',
    'age':18
}
res = requests.post(url,headers=headers ,data=params)
# res.text  #以文本的形式返回数据
# res.content #以二进制的形式返回数据
# res.json() # 接收json字符串数据
print (res.text)